package ${entityPackageName};
import lombok.*;
import java.io.Serializable;
import java.util.Date;
import java.time.LocalDateTime;

import java.math.BigDecimal;

import cn.kawins.mybatis.base.BaseModel;
import cn.kawins.mybatis.interceptor.FillingCreateTime;
import cn.kawins.mybatis.interceptor.InsertAutoFilling;
import cn.kawins.mybatis.interceptor.UpdateAutoFilling;
import cn.kawins.mybatis.util.SnowflakeId;
import io.swagger.annotations.ApiModelProperty;
import tk.mybatis.mapper.annotation.KeySql;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
/**
* @ClassName: ${entityName}
* @Description: ${tableDes!}实体类
* @author ${authorName}
* @date ${currentTime}
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Table(name = "${tableName}")
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class ${entityName} extends BaseModel<Long> implements Serializable  {
    private static final long serialVersionUID = 1L;
    <#--属性遍历-->
    <#list afterExcludeProps as column>
        /**
        * ${column.fieldComment!}
        */
        <#if column.columnName == "id">
            @Id
            @KeySql(genId = SnowflakeId.class)
            @JsonSerialize(using = ToStringSerializer.class)
        </#if>
        <#if column.columnName == "create_time">
        @InsertAutoFilling(value = FillingCreateTime.class)
        </#if>
        <#if column.columnName == "update_time">
        @UpdateAutoFilling(value = FillingCreateTime.class)
        </#if>
        @ApiModelProperty(value = "${column.fieldComment!}")
        @Column(name = "${column.columnName!}")
        private ${column.javaType} ${column.caseAttrName};
    </#list>
}